package Program.Information;

public class User {
    // 用户ID：主键
    private int userID;
    //用户名：登录用
    private String userName;
    //用户密码：登录用
    private String userPassword;
    //用户姓名
    private String name;
    //用户性别
    private String userSex;
    //用户类型：业主、租户
    private String usertype;
    //用户手机
    private String phone;
    //用户预存款
    private double adDeposit;
    //门牌地址
    private String place;
    //用户状态是否可用
    private String state;

    public User() {
    }

    public User(int userID, String userPassword, String name, String userSex, String usertype, String phone, double adDeposit, String place, String state) {
    }

    public User(String userName, String userPassword, String name, String userSex, String usertype, String phone,
                double adDeposit, String place, String state) {
        this.userName = userName;
        this.userPassword = userPassword;
        this.name = name;
        this.userSex = userSex;
        this.usertype = usertype;
        this.phone = phone;
        this.adDeposit = adDeposit;
        this.place = place;
        this.state = state;
    }

    public User(int userID, String userName, String userPassword, String name, String userSex,
                String usertype, String phone, double adDeposit, String place, String state) {
        this.userID = userID;
        this.userName = userName;
        this.userPassword = userPassword;
        this.name = name;
        this.userSex = userSex;
        this.usertype = usertype;
        this.phone = phone;
        this.adDeposit = adDeposit;
        this.place = place;
        this.state = state;
    }

    public int getUserID() {
        return userID;
    }

    public void setUserID(int userID) {
        this.userID = userID;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    public String getUsertype() {
        return usertype;
    }

    public void setUsertype(String usertype) {
        this.usertype = usertype;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public double getAdDeposit() {
        return adDeposit;
    }

    public void setAdDeposit(double adDeposit) {
        this.adDeposit = adDeposit;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "User [userID=" + userID + ", userName=" + userName + ", userPassword=" + userPassword + ", name=" + name
                + ", userSex="+ userSex + ", usertype=" + usertype + ", phone=" + phone + ", adDeposit=" + adDeposit + ", place=" + place
                + ", tate=" + state + "]";
    }

    public String[] toStrArray(){
        //"编号","用户名","业主姓名","手机","类型","门牌","是否可用"
        String[] strArray ={""+userID,userName,name,phone,usertype,place,state};
        return strArray;
    }
}
